home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / wwbbs31_source.lha / Include / OwnDevUnit.h next >
C/C++ Source or Header  |  1994-06-28  |  2KB  |  44 lines

  1. /* OwnDevUnit.h
  2.  
  3.    Created 2/10/91 by Christopher A. Wichura
  4. */
  5.  
  6. #ifndef EXEC_TYPES_H
  7. #include <exec/types.h>
  8. #endif
  9.  
  10. /* macro to grab the name of the library */
  11. #define ODU_NAME "OwnDevUnit.library"
  12.  
  13. /* strings that can be returned by LockDevUnit() and AttempDevUnit() to
  14.    indicate an internal error.  Note that these all start with a
  15.    special character to allow clients to only have to check one byte
  16.    to determine if an error occured. */
  17.  
  18. #define ODUERR_LEADCHAR "\x07"
  19.  
  20. #define ODUERR_NOMEM    ODUERR_LEADCHAR "Out of memory"
  21. #define ODUERR_NOTIMER    ODUERR_LEADCHAR "Unable to open timer.device"
  22. #define ODUERR_BADNAME    ODUERR_LEADCHAR "Bogus device name supplied"
  23. #define ODUERR_BADBIT    ODUERR_LEADCHAR "Bogus notify bit supplied"
  24. #define ODUERR_UNKNOWN    ODUERR_LEADCHAR "Unknown"
  25.                 /* returned if owner's name is NULL */
  26.  
  27. /* prototypes for the functions found in this library */
  28. UBYTE *LockDevUnit(UBYTE *Device, ULONG Unit, UBYTE *OwnerName, UBYTE NotifyBit);
  29. UBYTE *AttemptDevUnit(UBYTE *Device, ULONG Unit, UBYTE *OwnerName, UBYTE NotifyBit);
  30. void   FreeDevUnit(UBYTE *Device, ULONG Unit);
  31. void   NameDevUnit(UBYTE *Device, ULONG Unit, UBYTE *OwnerName);
  32. BOOL   AvailDevUnit(UBYTE *Device, ULONG Unit);
  33.  
  34. #ifndef  EXEC_LIBRARIES_H
  35. #include <exec/libraries.h>
  36. #endif
  37.  
  38. extern struct Library *OwnDevUnitBase;
  39. #pragma libcall OwnDevUnitBase LockDevUnit    1E 190804
  40. #pragma libcall OwnDevUnitBase AttemptDevUnit 24 190804
  41. #pragma libcall OwnDevUnitBase FreeDevUnit    2A 0802
  42. #pragma libcall OwnDevUnitBase NameDevUnit    30 90803
  43. #pragma libcall OwnDevUnitBase AvailDevUnit   36 0802
  44.